Implementing Custom Logic with Extension Classes |
|
In WS-AppServer, when Java code is generated and compiled it creates two Java class files for each model - Base ( <classname>Base ) and Extension ( <classname> ). To implement any custom logic, you have to do it in the Extension Java class. These are created within a folder by nameJava Archive <name of the package>.
- In the Workspace Documents (Explorer), open <solution> > <project> > Java Archive <package name> > com > <package name>, and double-click the generated extension class (<class>.java). The <class>.java window appears, displaying the code of the selected extension class.
- Append the custom logic to the existing code and save the file.
Your custom logic is ready to be used in the WS-AppServer applications.
After you complete this task:
You need to validate the project to compile the modified Java code, so that it works during runtime.